package com.zmc.admin.infrastructure.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.zmc.admin.infrastructure.entity.SysPostEntity;
import com.zmc.admin.infrastructure.bean.query.SysPostQuery;
import com.zmc.common.utils.PageUtils;

import java.util.List;

/**
 * 岗位信息表
 *
 * @author zmc
 * @email 
 * @date 2024-10-09 17:27:49
 */
public interface SysPostService extends IService<SysPostEntity> {

    PageUtils pagePostList(SysPostQuery query);

    List<SysPostEntity> selectPostList(SysPostQuery query);

    boolean checkPostNameUnique(SysPostEntity post);

    boolean checkPostCodeUnique(SysPostEntity post);

    List<SysPostEntity> selectPostsByUserName(String userName);

    /**
     * 根据用户ID获取岗位选择框列表
     *
     * @param userId 用户ID
     * @return 选中岗位ID列表
     */
    public List<Long> selectPostListByUserId(Long userId);

}

